﻿using Architecture.Domian.Entity;
using Architecture.Repository.Interface;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Repository.Impl
{
    public class MenuRepository :BaseRepository<MenuInfo>, IMenuRepository
    {
        public MenuRepository(EFCoreDbContext dbContext) : base(dbContext)
        {
        }

        public async Task<int> AddAsync(MenuInfo entity)
        {
            return await base.AddAsync(entity);
        }

        public async Task<int> BatchDeleteAsync(List<MenuInfo> roleInfos)
        {
            return await base.BatchDeleteAsync(roleInfos);
        }

        public async Task<int> DeleteAsync(MenuInfo entity)
        {
            return await base.DeleteAsync(entity);
        }

        public async Task<List<MenuInfo>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }

        public async Task<List<MenuInfo>> GetAsync(Expression<Func<MenuInfo, bool>> expre)
        {
            return await base.GetAsync(expre);
        }

        public async Task<MenuInfo> GetByFuncAsync(Expression<Func<MenuInfo, bool>> expre)
        {
            return await base.GetByFuncAsync(expre);
        }

        public async Task<MenuInfo> GetByIdAsync(int id)
        {
            return await base.GetByIdAsync(id);
        }

        public async Task<int> UpdateAsync(MenuInfo entity)
        {
            return await base.UpdateAsync(entity);
        }
    }
}
